home *** CD-ROM | disk | FTP | other *** search
- Debugging
- ---------
-
- setup.prg, install.prg and config.prg can all output logging
- information. This is normally sunk except when a .log file of the same
- name as the program is detected in whatever directory TOS thinks is
- the current one. The .log file gets overwritten each and every time
- the associated program is run. Delete the .log file to stop logging
- for the program.
-
- Example 1:
-
- You have an active window open on h:\www\setup\ and run setup.prg, you
- need to create h:\www\setup\install.log and h:\www\setup\config.log to
- get logging performed. They can contain any old garbage as they will
- be overwritten.
-
- Example 2:
-
- You have an active window open on h:\www\setup\install\ and run
- install.prg directly. You need to create
- h:\www\setup\install\install.log and also
- h:\www\setup\install\config.log
-
- I know this is a little complicated but shel_read() is not available
- for interrogation so an access is performed using just the filename
- with no path information. Users of systems where the TOS current
- directory can differ from that of the program can use this feature to
- implement a logging directory.
-
- Each invocation of the log function opens and closes the file. This is
- slow but effective in ensuring the log is up to date if there is a
- crash. Failure by the log function to access the file results in a
- text message being dumped rudely onscreen - but at least you will
- know!
-
-